package thesis;
import com.mongodb.DBObject;


public class StatsInfoExtractor {
	private DBObject stats;
	
	public StatsInfoExtractor(DBObject stats){
		this.stats = stats;
	}
	
	public int getResultId(){
		int resultId = (Integer)stats.get("result_id");
		
		return resultId;
	}
	
	public String getBeginDate(){
		String beginDate = stats.get("begin_date").toString();
		
		return beginDate;
	}
	
	public String getEndDate(){
		Object endDate = stats.get("end_date");
		
		if(endDate == null){
			return null;
		}
		else{
			return endDate.toString();
		}

	}
	
	public boolean hasEndDate(){
		if (getEndDate() != null){
			return true;
		}
		else{
			return false;
		}
	}
	
	public int getTweetsNumberLimit(){
		Integer tweetsNumberLimit = (Integer)stats.get("tweets_number_limit");
		
		return tweetsNumberLimit;
	}
	
	public int getSummarySize(){
		Integer summarySize = (Integer)stats.get("summary_size");
		
		return summarySize;
	}
	
	public int getNumberOfPages(){
		Integer numberOfPages = (Integer)stats.get("number_of_pages");
		
		return numberOfPages;
	}
	
	public double getQuality(){
		double quality = (Double)stats.get("quality");
		
		return quality;
	}
	
	public double getCoverage(){
		double coverage = (Double)stats.get("coverage");
		
		return coverage;
	}
	
	public double getDiversity(){
		double diversity = (Double)stats.get("diversity");
		
		return diversity;
	}
}
